;
var db = require("../../javascript/mysql");
var mysql = new db.mysqlClient("accident");
function genProductInfo() {
    plan = {
        "planA": {
            "name": "国民意外综合险",
            "company": "太平洋保险",
            "year": "16-65",
            "days": "1y",
            "people_count": "1",
            "accident_death": "100000",
            "accident_medical": "10000",
            "danger_sports": "",
            "sudden_death": "",
            "accident_fracture": "",
            "accident_hospital": "50/天",
            "accident_ambulance": "100",
            "passenger_death": "100000",
            "private_death": "100000",
            "train_death": "200000",
            "airplane_death": "",
            "ship_death": "",
            "public_duty": "",
            "price": "65.00"
        },
        "planB": {
            "name": "国民意外综合险",
            "company": "太平洋保险",
            "year": "16-65",
            "days": "1y",
            "people_count": "1",
            "accident_death": "300000",
            "accident_medical": "30000",
            "danger_sports": "",
            "sudden_death": "",
            "accident_fracture": "10000",
            "accident_hospital": "100/天",
            "accident_ambulance": "300",
            "passenger_death": "200000",
            "private_death": "200000",
            "train_death": "500000",
            "airplane_death": "1000000",
            "ship_death": "500000",
            "public_duty": "50000",
            "price": "186.00"
        },
        "planC": {
            "name": "国民意外综合险",
            "company": "太平洋保险",
            "year": "16-65",
            "days": "1y",
            "people_count": "1",
            "accident_death": "500000",
            "accident_medical": "50000",
            "danger_sports": "",
            "sudden_death": "100000",
            "accident_fracture": "20000",
            "accident_hospital": "200/天",
            "accident_ambulance": "500",
            "passenger_death": "500000",
            "private_death": "500000",
            "train_death": "800000",
            "airplane_death": "3000000",
            "ship_death": "800000",
            "public_duty": "100000",
            "price": "348.00"
        },
        "planD": {
            "name": "国民意外综合险",
            "company": "太平洋保险",
            "year": "16-65",
            "days": "1y",
            "people_count": "1",
            "accident_death": "500000",
            "accident_medical": "60000",
            "danger_sports": "500000",
            "sudden_death": "250000",
            "accident_fracture": "20000",
            "accident_hospital": "300/天",
            "accident_ambulance": "1000",
            "passenger_death": "500000",
            "private_death": "500000",
            "train_death": "1000000",
            "airplane_death": "5000000",
            "ship_death": "1000000",
            "public_duty": "200000",
            "price": "510.00"
        },

    }
    for (k in plan) {
        data = plan[k];
        mysql.insertData( data );
        

    }
    mysql.close();

}
